package com.youlu.campus.activity.entity;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;

import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;

/**
 * 活动抽奖 关联奖品配置实体类
 *
 * @Description: ActivityLotteryConfig
 * @Date 2025/7/31
 * @module ActivityLotteryConfig
 * @author: su
 */
@Data
@Document(collection = "activity_lottery_config_prize")
public class ActivityLotteryConfigPrize {

    @Id
    private String id;

    @Indexed
    @NotNull(message = "抽奖配置id不能为空")
    private String lotteryId;// 抽奖配置 id

    /**
     * 奖品id
     */
    @Indexed
    @NotNull(message = "奖品id不能为空")
    private String prizeId;

    /**
     * 一次中奖数量
     */
    private Integer oneCount = 0;

    /**
     * 奖品总数量
     */
    private Integer totalCount = 0;

    /**
     * 剩余数量
     */
    private Integer remainingCount = 0;

    /**
     * 中奖概率(百分比)
     */
    private Integer probability = 0;

    /**
     * 顺时针 排序 从小到大
     */
    private Integer sort;


    private LocalDateTime createTime; // 创建时间
}
